TSpinDateEdit  and  TDBSpinDateEdit
Version 1.5e

(c) copyright 1997 by W.Braun. All rights reserved. 

Borland Delphi 1-3 and C++Builder VCL-Components

  

Dear developer and user,

with these components you can cover all date entryfields 
in your application and so you achieve an uniform formatted
outward shape of your application.

The componente supported the international/users 
settings of windowssystem date parameters. 

The manual entry of the date in this component is very
elaborate and catches the errorentrys.

Also you can append the Spin and Calendar functions to this components.

I hope these components will help you with your work and make it a 
little bit easier.

Content

    
   1. Installation
   2. Properties
   3. Description
   4. Registration   
   5. New
   6. Glossary
   7. Warranty	 
   8. Shareware
   9. Order

>>1. Installation 

I. Delphi 1-2 
   Please use for Delphi 1.x  "DATE_16.ZIP" and for Delphi 2.x  "DATE_32.ZIP".

   1. Copy the files DATEED.DCU, DATEED.DFM, DATEED.RES and DATEED.DCR
      into any subdirectory; e.g. C:\DELPHI\Z_COMP   
   2. Choose Options | Install Components
   3. Click Add
   4. Type the name of directory where you placed the component followed
      by DATEED.DCU, e.g. C:\DELPHI\Z_COMP\DATEED.DCU 
   5. Click OK
   6. Click OK

II. Delphi 3
   Please use "DATE32_3.ZIP" file 
   1. Copy the files DATEED.DCU, DATEED.DFM, DATEED.RES and DATEED.DCR
      into any subdirectory; e.g. C:\DELPHI\Z_COMP   
   2. Choose Components | Install Components
   3. Select your favorited package ( default dclusr30.dpk) and 
      click Add.
   4. Type the name of directory where you placed the component followed
      by DATEED.DCU, e.g. C:\DELPHI\Z_COMP\DATEED.DCU
      or click browse to find the unit DATEED.DCU  
   5. Click Compile
   6. Follow until message 'TSpinDateEdit and TDBSpinDateEdit have been registered'
   7. Save package 

I. C++ Builder
   Please use "DATE_CB.ZIP" file.

   1. Copy the files DATEED.OBJ, DATEED.HPP; DATEED.DFM, DATEED.RES and DATEED.DCR
      into any subdirectory; e.g. C:\CBUILDER\Z_COMP   
   2. Choose Options | Install Components
   3. Click Add
   4. Type the name of directory where you placed the component followed
      by DATEED.DCU, e.g. C:\CBUILDER\Z_COMP\DATEED.OBJ 
   5. Click OK
   6. Click OK

In the new page on your component palette WB you will find
this new components. 
Now you only have to click these components and afterwards
you put then on your form at the right position.


>>2.  Properties


The following properties apply to both components 

TSpinDateEdit, TDBSpinDateEdit


Properties :
      property ActiveColor  : TColor, color if focused, default clWindow
      property Alignment: default taLeftJustify;
      property Autosize;  
      property +CalendarProperties, Calendarpopup properties :
                Enabled     : boolean, Calendarbutton/Calendarpopup 
                              on/off , default on
                AutoStart   : boolean, pops the calendar OnEnter,
			      default False 
                Color       : TColor, Calendarpopup color, default clBackground
                HelpContext : THelpContext, HelpContext for Calendarpopup
                Position    : Position of Calendarform, default posAbove
                              [posAbove,posBelow,posLeft,posRight,posOnTop]
		SaturdayColor : TColor
                StartOfWeek : day of week the calendargrid starts on
                              default daySU  
                	      [daySu,dayMo,dayTu,dayWe,dayTh,dayFr,daySa] 
		SundayColor : TColor
                WeekEndSelectable : boolean, WeekEnd ( Sunday/Saturday ) can be
				    selected in Calendar or not, default True
                WeekOfYear  : boolean, calendarweek of year on/off
                WeekOfYearColor : TColor, color for calendarweek, default clBlack;
      
      property Century : boolean, Century on/off default True
      property Color;
      property Ctl3D;
      property DateValue : string, Date in ShortDateFormat 
      property DragCursor;
      property DragMode;
      property Enabled;
      property Font ;
      property IncrementDate: Increment for Spin or +/-, default iOneDay
               [iOneDay, iTwoDays, iThreeDays, iOneWeek, iTwoWeek,
                iOneMonth,iQuarterYear,iHalfYear,iOneYear]                          
      property Info : InfoMessageBox about this component
      property ParentCtl3D;
      property ParentFont;
      property ParentShowHint;
      property PopupMenu;
      property ReadOnly;
      property ShowHint;
      property Spin :  boolean, Spinbuttons on/off, default off
      property TabOrder;
      property TabStop;
      property Value: TDateTime, Date in TDateEditFormat
      property Visible;
      property OnBeforeChange;
      property OnCalClick;    
      property OnCalOpen;	
      property OnCalClose;
      property OnChange;
      property OnClick;
      property OnDblClick;
      property OnDragDrop;
      property OnDragOver;
      property OnEndDrag;
      property OnEnter;
      property OnExit;
      property OnKeyDown;
      property OnKeyPress;
      property OnKeyUp;
      property OnMouseDown;
      property OnMouseMove;
      property OnMouseUp;
      property OnSpinDownClick;
      property OnSpinUpClick;
      property OnStartDrag; ( only 32 Bit )  	


Additional the TDBSpinDateEdit have follows properties

DataField	DateField , Datatype ftDate, ftDateTime
DataSource	DataSource for Table or Query
      	

>>3. Description


TSpinDateEdit serves for simplification of the entry of Date. 
The standardly delivered tools from Borland are only useful 
for limited possibilities (look TMaskEdit,TDbEdit). 

The entry of the date issue with ShortDateFormat ( e.g. 01/10/1997 ), 
whereby the DateSeparatorChar will be automatically jump over.
 
The employer can change date of this kind  :
 1. By manuel entry of Date. The component will be correct 
    errorentries ( e.g. 13 Month , 11/31 , 2/29/97, ... ) . 
 2. With +/- or with Up/Down-Button from SpinButton
 3. Click on the calendarbutton or DoubleClick on entryfield
    open the calendar and the employer can choose the 
    desire Date.

The programmer can change date with follow properties : 
 1. DateValue : date can be entry as string ( ShortDateFormat).
    The property Value will be updated automatically.     
    Used to set the current date in the IDE. If datestring is faulty 
    the IDE will display an errormessage. 
    At the runtime it's better to use the property Value,
    because an incorrectly datestring will be produce exception and,
    if it's not to be intercepted, a messagebox.   
    Use the DateValue as DateString (e.g. Label1.Caption:=SpinDateEdit1.DateValue)
    and Value as connection to Delphi-Datefunctions 
    (e.g. SpinDateEdit1.Value:=Now).

 2. Value : is a type of TDateTime and represent date as number.
    The property DateValue will be updated automatically.     

    This property is the connection to the datesystemroutines
    ( e.g. Now, DateToStr, TDateField.Value, etc.).   
     
    You can use this property also in the IDE, but you must know :
    for Delphi 2.x Value:=0 is equal to 12/30/1899.
	
    Decimalpart of TDateTime represent in Delphi the timepart of date,
    so you can also use decimalpart of Value as time.  
     
    The limits of Value are : 
    const      
    {$IFDEF WIN32}      
    DateDelphi   =-657434; { Date=01/01/0100 Min} 
    DateDelphiMax=2958465; { Date=12/31/9999}
    {$ELSE}
    DateDelphi   =1;       { Date=01/01/0001 Min} 
    DateDelphiMax=3652059; { Date=12/31/9999}
    {$ENDIF}

    This limits are defined from delphideveloperteam 
    ( DelphiDateconventions), only the DateDelphi for Delphi 2.x 
    is defined as date of 01/01/0100, because datesystemroutinies
    not working correctly with smaller values.
         

The property Century decided whether the DateValue have the centurypart,
independent of systemsettings. So you can design your form independent of
individual windowssystemsettings from employer.
The property of datesystemroutinies to add to result the century of 
systemdate if year is smaller as 100 will be catched.   

Property Spin make the capability of Increment visible.

Use the OnBeforeChange event handler to cause any special 
processing to occur before DateValue becomes the new value. 

Calendar is a nonmodalform with calendargrid.

CalendarProperties :

 -Enabled     : make Calendar available or not.
  If true then CalendarButton is visible, the applier can by click
  on this button or doubleclick on the entryfield start Calendar.
 -AutoStart   : start the calendarwindow OnEnter
 -Color       : color of calendarwindow 
 -Helpcontext : Helpcontext for Calendarwindow
 -Position    : position of calendarwindow on screen to the editfield  
 -SaturdayColor : color of saturdays
 -StartOfWeek : first day of week of calendargrid
 -SundayColor : color of sundays
 -WeekEndSelectable : make Weekenddays (Saturday,Sunday ) selectable or not 
 -WeekOfYear  : calendarweek 
 -WeekOfYearColor : color of calendarweek 

Description of Calendarform :
- Calendargrid.
- Label with selected month and year. Doubleclick reset to topical date
- buttons for month forward/Back
- buttons for year forward/Back
- tabulator/shift-tabulator month forward/back
- +/- Increment 
- bug by overstep of datelimits

Calendarform will be closed by :
-Pressing the enterkey, selected date will be commit to entryfield
-Doubleclick on a day in calendar, selected date will be commit to entryfield
-Pressing the escapekey or click outside of calendarform, 
 result will not be commit. 

The additional properties of the TDBSpinDateEdit be useful for 
databaseconnection and they can use for display and/or manipulation 
the entries of the fields of the connected table or query. 

Other Properties inherited unchanged from TCustomEdit, same adjust
for my requirements.


>>4. Registration


Please read also the file order.txt

Price for this components is 
  -$15.00 (US) without Source 
  -$30.00 (US) with Sourcecode ( > 2500 lines ).

Notice : For C++ Builder registration only with Source-Code !!!

To order you can do this by following options :

1. CompuServe's Online Registration : GO SWREG 

   - TSpinDateEdit : -File-ID 14245  without Source
                     -File-ID 14900  with    Source
   - TGermDateEdit : -File-ID 15615  without Source
                     -File-ID 15616  with    Source
   -   Update from TSpinDateEdit : 
                     -File-ID 15617 without Source
   -   Update from TSpinDateEdit : 
                     -File-ID 15618  with    Source
   - TSpinDblEdit :  -File-ID 12832  without Source
                     -File-ID 14901  with    Source   

2. Order by sending me an e-Mail.

3. Fill out and send the order form "order.txt"  
 

If I can send the components to you on electronic way, so you don't need add 
postal charge, another way please add 2.00$ postage Germany, 
3.00$ for all other countries.

Registered users will receive any updates for the next year. 
Additional the registered version include the TSpinDateedit-calendargrid as
separat component.

The unregistered version can use with all functions, but only while the 
Delphi IDE is running. 
       
>>5. New

Version 1.5e ( 08/08/1997)

-Key Alt+Down/Up opens the calculator (like ComboBox)
 suggestion from Thomas Grusche, 100027.231@compuserve.com
-Property ActiveColor 
 suggestion from G.Schmitthenner, Calcul-Schmitthenner@t-online.de 
-Bugfix for Ctl3D = False
-BugFix for SelectALL and press Del OnChange Event
-inherited properties like BorderStyle now published into Delphi 2+3 too.


Version 1.5d
- Eventhandler
  OnBeforeChange  Before Value becomes the new value  
  OnCalClick      Calculator button click
  OnCalOpen	  Calculator open
  OnCalClose      Calculator close
  OnSpinDownClick Down button click
  OnSpinUpClick   Up button Click 

- Calendarproperties and CalWB
  Property WeekEndSelectable True,False

Bugfixes 
  - select all and clear with Del/Back now 
    set DateValue correctly empty. 

 
Version 1.5c

-Clear now working correctly
-Day and Month display now allways with 2 Digits e.g. 01/01/1997
 independent of WIN.INI

Version 1.5b
- Delphi 3 support
- bugs (e.g. 32 Bit design modus by WMPaint-Message, ...)

Version 1.5a

- DBSpinDateEdit can be used now without DataSource too
- Calculatedfields working exactly as original TDBEdit

Version 1.5

- DbCtrlGrid Support ( Delphi 32 )
- Calendar : SundayColor, SaturdayColor properties

Version 1.4

-Calendar AutoStart : Enter with VK_TAB now fixed with Timer
		      ( no jump month before open Calendar) 	
-AutoSelect
-ParentColor

 
New in Version 1.3 :

Thanks to Markus Schwaiger for suggestion of calendarweek

     -DateedC Unit not necessary

     -Calendarproperties
        property Enabled
        property AutoStart
        property Color                  New in 1.3
        property HelpContext
        property Position
        property StartOfWeek
        property WeekOfYear             New in 1.3
        property WeekOfYearColor        New in 1.3

      not available : property Calendar          New CalendarProperties.Enabled
                      property AutoCalendar      New CalendarProperties.AutoStart
                      property CalHelpContext    New CalendarProperties.HelpContext
                      property CalPosition       New CalendarProperties.Position
                      property CalStartOfWeek    New CalendarProperties.StartOfWeek

                      property Increment         New IncrementDate
     Bug fixed : 
       -AutoCalendar not jumps to the next month into calendargrid 
       -DB OnEnter,OnExit not longer change Datalink.State to modified
        without Edit.Change
       -SpinDateEdit.Height the same like TEdit.Height 


New in version 1.2 :

- much better controls of Spacebar
- bug fixes  


New in version 1.1:

(thanks to Richard Haven for his suggestion)

- Increment property not longer supported, please use IncrementDate
- IncrementDate enumeration property 
  (iOneDay, iTwoDays, iThreeDays, iOneWeek, iTwoWeek, iOneMonth,
  iQuarterYear,iHalfYear,iOneYear)
- AutoCalendar, pops the calendar OnEnter
- CalStartOfWeek, day of the week the calendar starts on
  (daySu,dayMo,dayTu,dayWe,dayTh,dayFr,daySa) 
- Space bar allow quick enter current date ( or part of date)
  Puts in the actual and follows parts (cursorposition) of datevalue the 
  respective part of current date.
  (e.g. datemask is mm/dd/yy. If cursor on month part spacebar
   fill mm/dd/yy with current date, if cursor on day part spacebar
   fill dd/yy, if ...)


- Clear now working correctly
- VK_DELETE,VK_BACK,WM_Cut,WM_Past now working correctly if
  the complete text selected



>>6. Glossary


I hope you get on well with this short description.
If you have questions or suggestion, send me some lines by eMail or Fax.
I'm thankfull for every good proposition.



Yours, 

Wilhelm Braun

eMail : Willi_Braun@compuserve.com
Fax   : +49 0621 6296754


>>7. Warranty


THIS SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS" AND WITHOUT 
WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY.

THESE COMPONENTS ARE PROVIDED WITHOUT ANY EXPRESS OR IMPLIED 
WARRANTIES WHATSOEVER. BECAUSE OF THE DIVERSITY OF 
CONDITIONS AND HARDWARE UNDER WHICH THESE COMPONENTS MAY BE 
USED, NO WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE IS 
OFFERED. THE USER IS ADVISED TO TEST THESE COMPONENTS THOROUGHLY 
BEFORE RELYING ON THEM. THE USER MUST ASSUME THE ENTIRE RISK 
OF USING THESE COMPONENTS. 


>>8. Shareware

THESE COMPONENTS ARE SHAREWARE. 
You may use the shareware version of these components for a 30 day
trial period.If you would like to continue to use these components
after the 30 day trial period, you are required to purchase the
licensed version of these components.


>>9. Order/Register form, use only for registration without 
     Compuserve Shareware Register Forum ( GO SWREG )



   ORDER FORM
   

   TSpinDblEdit/TDBSpinDblEdit    
   TSpinDateEdit/TDBSpinDateEdit 
   TGermDateEdit/TDBGermDateEdit


   Name:   _______________________

   Address:_______________________

           _______________________

           _______________________

           _______________________




Product: Delphi 1-3, C++ Builder

   ____  TSpinDblEdit\TDBSpinDblEdit             $15 US
   ____  TSpinDblEdit\TDBSpinDblEdit   Source    $30 US
   ____  TSpinDateEdit\TDBSpinDateEdit           $15 US
   ____  TSpinDateEdit\TDBSpinDateEdit Source    $30 US
   ____  TGermDateEdit\TDBGermDateEdit           $25 US
   ____  TGermDateEdit\TDBGermDateEdit Source    $40 US
   ____  TGermDateEdit\TDBGermDateEdit 
	 Update from TSpinDateEdit               $10 US
   ____  TGermDateEdit\TDBGermDateEdit Source 
       	 Update from TSpinDateEdit Source        $10 US

   

                 Check or money order only.
		 PLEASE MAKE PAYABLE TO "W. BRAUN".

   Shipping:

           ____  3.5" Floppy Disk ( Add $2 postage Germany, other $3) 

           ____  eMail : ____________________________


   Mail Address :
      W. Braun
      Softwareentwicklung und Vertrieb
      Bruehlstr. 40
      67069 Ludwigshafen
      Germany
      Fax : +49 0621 6296754